package dev.projectnightfall.graphics.states;

import dev.projectnightfall.graphics.RenderEngine;
import org.lwjgl.input.Keyboard;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class OptionsMenuState extends AGameState {

    public OptionsMenuState(int stateID) {
        super(stateID);
    }

    @Override
    public void init(GameContainer container, StateBasedGame game)
            throws SlickException {
    }

    @Override
    public void render(GameContainer container, StateBasedGame game, Graphics g)
            throws SlickException {
        g.drawString("Le Options Menu", 50, 50);
        g.drawString("Press B to go back to the main menu", 50, 70);
    }

    @Override
    public void update(GameContainer container, StateBasedGame game, int delta)
            throws SlickException {

        Input in = container.getInput();

        if (in.isKeyPressed(Keyboard.KEY_B)) {
            game.enterState(RenderEngine.MAINMENUSTATE);
        }
    }
}
